<!doctype html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <!-- 响应式 -->
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>{% block title %} {% endblock %}</title>
  <!-- css file -->
  <link rel="stylesheet" href="/static/bootstrap/css/bootstrap.min.css">
  <link rel="stylesheet" href="/static/css/comm.css">
  <style>
     body{
          overflow-y: auto;
          min-width: 1200px !important;
      }
    </style>
  <!-- end css file -->
</head>
<body>
<!-- start header -->
<nav class="navbar navbar-default">
  <div class="container">
    <!-- Brand and toggle get grouped for better mobile display -->
    <div class="navbar-header">
      <button type="button" class="navbar-toggle collapsed" data-toggle="collapse"
              data-target="#bs-example-navbar-collapse-1" aria-expanded="false">
        <span class="sr-only">Toggle navigation</span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
        <span class="icon-bar"></span>
      </button>
      <a class="navbar-brand" href="/index">DomainTrade</a>
    </div>

    <!-- Collect the nav links, forms, and other content for toggling -->
    <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
      <ul class="nav navbar-nav navbar-right">
        <li class="dropdown">
          <a href="/index" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true"
             aria-expanded="false">更多操作<span class="caret"></span></a>
          <ul class="dropdown-menu">
            <li><a href="/admin/registered-list">域名抢注清单</a></li>
            <li><a href="/admin/reserve-list">域名预定清单</a></li>
            <li><a data-toggle="modal" data-target="#Update">批量上传域名</a></li>
            <li><a data-toggle="modal" data-target="#Modify">修改信息</a></li>
            <li><a data-toggle="modal" data-target="#AddDomain">添加域名</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="/signout">登出</a></li>
          </ul>
        </li>
      </ul>
      <div class="navbar-form navbar-right">
        <div class="form-group control-label">
          <input id="whios_values" type="text" value class="form-control" placeholder="Whois查询..">
        </div>
        <a id="whois_search" class="btn btn-primary" target="_blank">搜索</a>
      </div>
    </div><!-- /.navbar-collapse -->
  </div><!-- /.container-fluid -->
</nav>
<!-- end header -->

<!-- start update doamin -->
<!-- Modal -->
<div class="modal fade" id="Update" tabindex="-1" role="dialog" aria-labelledby="UpdateLabel">
  <div class="modal-dialog" role="document">
    <form enctype="multipart/form-data" action="/admin/domainUpdate" method="post">
      <div class="modal-content">
        <div class="modal-header">
          <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                  aria-hidden="true">&times;</span></button>
          <h4 class="modal-title" id="UpdateLabel">批量上传域名</h4>
        </div>
        <div class="modal-body">
           <span class="ad-up-font">
                <span style="color: red;">&nbsp;*
                    <span style="color: green;">请使用excel表格形式上传文件
                <span style="font-size: 15px;color: #0c79b1;">(支持上传格式后缀：*.xls、*.xlsx)
                </span><br/>
                      <span style="font-size: 20px; text-align: center; color: red;">上传过程中请勿中断</span>
                    </span>
                </span>
           </span>
          <p>&nbsp;</p>
          <input type="file" id="excel-file" name="excel-file" class="btn-link" value="请选择excel文件">
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-primary" data-dismiss="modal">Close</button>
          <input type="submit" class="btn btn-primary" value="上传" class="btn-default"/>
        </div>
      </div>
    </form>
  </div>
</div>
<!-- end update doamin -->

<!-- start modify super user info -->
<!-- Modal -->
<div class="modal fade" id="Modify" tabindex="-1" role="dialog" aria-labelledby="ModifylLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title text-center" id="ModifyLabel">修改信息(可局部修改)</h4>
      </div>
      <form action="/admin/reinfo" method="POST">
        <div class="modal-body">
          <div class="form-group">
            <label for="email">邮箱</label>
            <input type="email" class="form-control" name='email' id="email"
                   placeholder="{{ user_info_dict.email }}">
          </div>
          <div class="form-group">
            <label for="tel">手机号码</label>
            <input type="tel" class="form-control" id="tel" name="tel"
                   placeholder="{{ user_info_dict.tel }}">
          </div>
          <div class="form-group">
            <label for="oldPasswd">旧密码</label>
            <input type="password" class="form-control" id="oldPasswd" name="oldPasswd" placeholder="旧密码">
          </div>
          <div class="form-group">
            <label for="newPasswd1">新密码</label>
            <input type="password" class="form-control" id="newPasswd1" name="newPasswd1" placeholder="新密码">
          </div>
          <div class="form-group">
            <label for="newPasswd2">再次确认新密码</label>
            <input type="password" class="form-control" id="newPasswd2" name="newPasswd2"
                   placeholder="再次确认新密码">
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          <input type="submit" id="subfrom" class="btn btn-primary" value="提交修改">
        </div>
      </form>
    </div>
  </div>
</div>
<!-- end modify super user info -->

<!-- start AddDomain -->
<!-- Modal -->
<div class="modal fade" id="AddDomain" tabindex="-1" role="dialog" aria-labelledby="AddDomainlLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span
                aria-hidden="true">&times;</span>
        </button>
        <h4 class="modal-title text-center" id="AddDomainLabel">添加域名信息</h4>
      </div>
      <form action="/admin/addDomain" method="POST">
        <div class="modal-body">
          <div class="form-group">
            <label for="domain">域名</label>
            <input type="text" class="form-control" name='domain' id="domain" placeholder="请输入要添加的域名">
          </div>
          <div class="form-group">
            <label for="domainExplain">备案文字说明</label>
            <input type="text" class="form-control" name='domainExplain' id="domainExplain" placeholder="域名备案说明">
          </div>
          <div class="form-group">
            <label for="transactionType">域名交易类型</label>
            <select class="form-control" name="transactionType" id="transactionType">
              <option value="1">一口价</option>
              <option value="0">竞价</option>
              <option value="2">待定</option>
            </select>
          </div>
          <div class="form-group">
            <label for="domainType">域名类型</label>
            <input type="text" class="form-control" name='domainType' id="domainType" placeholder="域名类型">
          </div>
          <div class="form-group">
            <label for="domainlLength">域名长度</label>
            <input type="text" class="form-control" name='domainlLength' id="domainlLength" placeholder="域名长度">
          </div>
          <div class="form-group">
            <label for="domainScore">域名评分</label>
            <input type="text" class="form-control" name='domainScore' id="domainScore" placeholder="域名评分">
          </div>
          <div class="form-group">
            <label for="domainEvaluation">估价</label>
            <div class="input-group">
              <div class="input-group-addon">$</div>
              <input type="text" class="form-control" id="domainEvaluation" name='domainEvaluation' placeholder="域名估价">
            </div>
          </div>
          <div class="form-group">
            <label for="domainHistory">历史量</label>
            <input type="text" class="form-control" name='domainHistory' id="domainHistory" placeholder="历史量">
          </div>
          <div class="form-group">
            <label for="domainAlexay">alexa</label>
            <input type="text" class="form-control" name='domainAlexa' id="domainAlexay" placeholder="alexa">
          </div>
          <div class="form-group">
            <label for="AntiChain">反链</label>
            <input type="text" class="form-control" name='AntiChain' id="AntiChain" placeholder="反链">
          </div>
          <div class="form-group">
            <label for="TheChain">外链</label>
            <input type="text" class="form-control" name='TheChain' id="TheChain" placeholder="外链">
          </div>
          <div class="form-group">
            <label for="domainAmount">收录量</label>
            <input type="text" class="form-control" name='domainAmount' id="domainAmount" placeholder="收录量">
          </div>
          <div class="form-group">
            <label for="domainPr">pr</label>
            <input type="text" class="form-control" name='domainPr' id="domainPr" placeholder="pr">
          </div>
          <div class="form-group">
            <label for="domainWeight">权重</label>
            <input type="text" class="form-control" name='domainWeight' id="domainWeight" placeholder="权重">
          </div>
          <div class="form-group">
            <label for="domainReTime">注册年限</label>
            <input type="text" class="form-control" name='domainReTime' id="domainReTime" placeholder="注册年限">
          </div>
          <div class="form-group">
            <label for="RemainingTime">剩余时间</label>
            <input type="text" class="form-control" name='RemainingTime' id="RemainingTime" placeholder="剩余时间">
          </div>
          <div class="form-group">
            <label for="domainPrice">价格</label>
            <div class="input-group">
              <div class="input-group-addon">$</div>
              <input type="text" class="form-control" id="domainPrice" name='domainPrice' placeholder="域名价格">
            </div>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
          <input type="submit" class="btn btn-primary" value="确认添加">
        </div>
      </form>
    </div>
  </div>
</div>
<!-- end AddDomain -->

<div class="container">
  <div class="admin-mould-box table-bordered">
    <p><a href="/admin" style="text-decoration: none;"><font color="black">后台域名管理</font></a></p>
  </div>
</div>
{% block body %}

{% endblock %}

<!-- js -->

<script src="/static/js/jquery.min.js"></script>
<script src="/static/js/jquery.cookie.js"></script>
<script src="/static/bootstrap/js/bootstrap.min.js"></script>


<script>
    $('#whios_values').change(function () {
        var whiosVlaues = $('#whios_values').val();
        if (whiosVlaues != '') {
            $('#whois_search').attr('href', 'http://whois.chinaz.com/' + whiosVlaues);
        } else {
            $('#whois_search').removeAttr('href', '');
        };
    });

    $(document).ready(function () {
        if ($('#tel').val() == '' && $('#oldPasswd').val() == '' &&
            $('#newPasswd1').val() == '' && $('#newPasswd2').val() == '') {
            $('#subfrom').attr('disabled', 'disabled');
        }
        ;
    });
    $('#tel').change(function () {
        if ($('#tel').val().length == 11) {
            $('#subfrom').removeAttr('disabled');
        };
    });
    $('#email').change(function () {
        if ($('#email').val().length != '') {
            $('#subfrom').removeAttr('disabled');
        };
    });

    $('#newPasswd2').change(function () {
        if ($('#oldPasswd').val() != '') {
            if ($('#newPasswd1').val() == $('#newPasswd2').val()
                && $('#newPasswd2').val().length >= 6) {
                $('#subfrom').removeAttr('disabled');
            };
        };
    });
</script>
<!-- end js -->
</body>
</html>